using System;
using System.Collections.Generic;
using System.Text;


using IDAL;
using Entities;

namespace Bll
{
    public class ShipBll
    {
        public IList<ShipInfo> GetAll()
        {
            IShipDAO iShip = (IShipDAO)AssemblyLoader.Load("ShipDAO");
            return iShip.GetAll();
        }

        public ShipInfo GetByName(string shipVia)
        {
            IShipDAO iShip = (IShipDAO)AssemblyLoader.Load("ShipDAO");
            return iShip.GetByName(shipVia);
        }

        public bool Insert(ShipInfo ship)
        {
            IShipDAO iShip = (IShipDAO)AssemblyLoader.Load("ShipDAO");
            return iShip.Insert(ship);
        }

        public bool Delete(ShipInfo ship)
        {
            IShipDAO iShip = (IShipDAO)AssemblyLoader.Load("ShipDAO");
            return iShip.Delete(ship);            
        }

        public bool Update(ShipInfo ship)
        {
            IShipDAO iShip = (IShipDAO)AssemblyLoader.Load("ShipDAO");
            return iShip.Update(ship);
        }
    }
}
